-
-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MessagePack codec #2371
Add MessagePack codec #2371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's great to have added implementations like this. See notes above about into_string
vs into_bytes
.
I think there is a deeper question here, of how many codecs we want to have available in leptos itself. I don't think this is an issue for MessagePack or this commit, but it's worth thinking about moving forward |
Overall this looks good, thanks for contributing! |
I haven't worked with this package before, so someone please feel free to correct me, but from skimming the package...honestly...should something like this be a flat replacement in most cases (1:1)? These little improvements towards an optimal Leptos sound wonderful, especially for a nosql or graphql DB when possible. |
A flat replacement? This isn't really for db access, this is for the server fn encoding between server and client. |
This adds MessagePack codec support.
To quote MessagePack, "it's like JSON but fast and small". I was wanting to make a param payload that included a decently-sized byte array inline, and JSON is pretty inefficient at that, so I added MessagePack support.
The CI hasn't finished running on my machine but I decided to go ahead and submit it anyways because the change is so isolated.